// 根组件
import React from 'react'
import Test from './components/Test'

export default class App extends React.Component {
  state = {
    test: [1, 2, 3],

    obj: {
      x: 1,
      y: 2,
      z: 3,
    },
  }
  render() {
    return (
      <div>
        <hr />
        {/* 通过props传递数据给Test */}
        {/* <Test x={this.state.obj.x} y={this.state.obj.y}></Test>
         */}
        {/* props批量传递的写法: 展示之后就是 属性={值} */}
        <Test {...this.state.obj}></Test>
        <hr />
      </div>
    )
  }
}
